﻿using System;
using System.Globalization;
using System.Windows.Data;

namespace FU.Capstones.IMS.Web.Common.Converters
{
    public class DecimalToVnCurrencyConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            double? inputValue = value as double?;
            if (inputValue.HasValue)
            {
                return inputValue.Value.ToString("N0", culture)+ " VND";
            }
            return string.Empty;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
